package com.ophiux.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.ophiux.entity.GateWayInfoEntity;

@Mapper
public interface GatewayInfoMapper {

    @Select("SELECT ID AS ID, route_id as routeid, route_name as routeName,route_pattern as routePattern" +
            ",route_type as routeType,route_url as routeUrl" +
            " FROM gateway_info")
    public List<GateWayInfoEntity> gateWayAll();

    @Update("update gateway_info set route_url=#{routeUrl} where route_id=#{routeId};")
    public Integer updateGateWay(@Param("routeId") String routeId, @Param("routeUrl") String routeUrl);
}
